package me.send.data.service.mapper;

import java.util.List;
import java.util.Map;

import me.send.data.service.pojo.Role;
import me.send.data.service.provider.RoleProvider;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;

public abstract interface RoleMapper {

	// 分页查询
	@SelectProvider(method = "list_page", type = RoleProvider.class)
	public abstract List<Map<String, Object>> list_page(
			Map<String, Object> parameter);

	@SelectProvider(method = "count", type = RoleProvider.class)
	public abstract int count(Map<String, Object> parameter);

	// 批量删除
	@SelectProvider(method = "batch_delete", type = RoleProvider.class)
	public abstract void batch_delete(Map<String, Object> parameter);

	// 增加方法
	@Insert(value = "insert into role(rolename,status,createtime,updatetime) values(#{rolename},#{status},#{createtime},#{updatetime})")
	public abstract void insert(Role role);

	// 更新方法
	@Update(value = "update role set rolename = #{rolename},status = #{status},updatetime = #{updatetime} where roleid = #{roleid}")
	public abstract void update(Role role);
}
